package com.mouseoverstudio.brekee;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public abstract class Service {

	public static Command serve(String[] args) throws NoSuchMethodException,
			IllegalArgumentException, InvocationTargetException, IllegalAccessException {
//		Method method = Brekee.class.getMethod(commandName, (Class[]) null);
//		Command command = (Command) method.invoke((Object[]) null,
//				(Object[]) null);
//		for (short i = 1; i < args.length; i++) {
//			commandName = args[i];
//			method = command.getClass().getMethod(commandName, (Class[]) null);
//			command = (Command) method.invoke(command, (Object[]) null);
//		}
//		BufferedReader read = new BufferedReader(new InputStreamReader(Brekee
//				.bash(command).getInputStream()));
//		while (read.ready()) {
//			System.out.println(read.readLine());
//		}
//		System.out.println("Bash command executed: " + command.toBashCommand());
		return null;
	}
}
